package com._520it.crm.service;

import com._520it.crm.domain.DiclearInfo;
import com._520it.crm.domain.OrderBill;
import com._520it.crm.page.PageResult;
import com._520it.crm.query.OrderBillQueryObject;
import com._520it.crm.query.QueryObject;

import java.math.BigDecimal;
import java.util.List;

/**
 * Created by 呆 on 2017/10/3.
 */
public interface IOrderBillService {
    int deleteByPrimaryKey(Long id);

    Long insert(OrderBill orderBill);

    OrderBill selectByPrimaryKey(Long id);

    List<OrderBill> selectAll();

    int updateByPrimaryKey(OrderBill orderBill);

    PageResult query(QueryObject qo);

    PageResult approvalQueryPage(OrderBillQueryObject queryObject);

    void updateTimeandBaseInfo(OrderBill orderBill);

    void applyCheck(String insurancePolicyNumber);

    BigDecimal querySpand(String insurancePolicyNumber);

    OrderBill queryInsuranceReturn();

    PageResult issuedReturnQueryPage(OrderBillQueryObject queryObject);

    PageResult queryByApplystate(OrderBillQueryObject qo);

    /**
     * 表单提交申请批改的方法
     * @param orderId 表单id
     * @param remark 提交批改说明
     */
    void checkApply(Long orderId ,String remark);
    //退回保存备注,并删除审核表关联
    void updateRemark(OrderBill bill);
    //修改状态
    void updateState(OrderBill bill);

    PageResult approvalQueryPageReturn(OrderBillQueryObject queryObject);

    PageResult approvalQueryPageInZC(OrderBillQueryObject queryObject);

    PageResult approvalQueryPageInApplyCheck(OrderBillQueryObject queryObject);



    //根据ID查询对应的明细:用于审核成功页面弹框
    OrderBill queryDetailData(Long id);

    /**
     * 根据表单id查询 相关的审核流程详细信息
     * @param id 表单id
     * @return
     */
    DiclearInfo selectDiclearInfo(Long id);

    //void updateStateByinsurancePolicyNumber(String insurancePolicyNumber,  int stateSqhb);
}
